package com.game.screen;

import processing.core.PImage;

public class GameScreenBackground extends Sprite {

	public static boolean pause = true;
	private float alpha = 0f;
	
	public GameScreenBackground(String img, int x, int y) {
		super(img, x, y);
	}

	public void reset(int x, int y){
		position.set(x, y);
	}
	
	@Override
	public void display() {
		if(!pause)
			position.setY(position.getY() + 0.25f);
		
		super.display();
		pApplet.image(pimg, position.getX(), position.getY() - pimg.height);
		
		if(position.getY() >= pimg.height){
			position.setY(0);
		}
		
//		if(!Player.asleep){
//			alpha += 2.0f;
//			pApplet.tint(0, 0, 0, alpha); 
//		}
	}

}
